<?php
/*  
  Copyright (c) 2010-02 SongCMS 
  SongCMS All Rights Reserved. 
  Support:www.SongCMS.com
  QQ:544255858   19951025
  Author:Song  Version:3.17
  Date:2010-08-12 09:28:32
*/
include_once('Admin.php');
if($WebStaticHTML != 1) die('您没有开通HTML静态功能，请在系统全局设定中开通后进入该页。');
include_once('../class/html.class.php');
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pramga: no-cache");

$html = new html();
$html -> HTMLProduction();
if(empty($html -> Error)){
	$Text = '正在生成第 <font class="sum">' . $html -> Files . '</font> 个静态文件：' . $html -> HTMLPath . '<br />';
	foreach($_GET as $i => $n){
		$Text .= $i.':'.$n.' ';
	}
	if($html -> isEnd == 1){ //生成完毕，逻辑处理
		$Text = '生成完毕，此次操作共生成了 <font class="sum">' . (($html -> Files)-1) . '</font> 个静态文件。';
		echo "<script type=\"text/javascript\">
		parent.document.getElementById('wait').innerHTML = \"静态页面生成完毕！\";
		</script>";
		AdminLog(7,$html -> Lang,'生成HTML静态文件，结果：操作成功！'); 
	}
} else {
		$Text = $html -> Error;
		echo "<script type=\"text/javascript\">
		parent.document.getElementById('wait').innerHTML = \"静态文件生成失败，操作终止。\";
		</script>";		
		AdminLog(7,$html -> Lang,'生成HTML静态文件，结果：操作失败！'); 
}
$Text .= "<br /><a href=\"{$html->xURL}\">如果进程意外终止或长时间没有反应请点这里</a>";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php echo $html -> JumpURL;?>
<style type="text/css">
body{padding:0; margin:0; font-family:Verdana, Geneva, sans-serif; font-size:13px; text-align:center; color:#363; line-height:25px;}
.sum{font-size:15px; font-family:Georgia, "Times New Roman", Times, serif; font-weight:bold; color:#FF0000;}
a{text-decoration:none; color:#060;}
a:hover{color:#F00;}
</style>
</head>
<body>
<?php echo $Text;?>
</body>
</html>
